package com.myzl.web.controller.coal;

import com.myzl.coal.service.IDeviceService;
import com.myzl.common.core.controller.BaseController;
import com.myzl.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName RealtimeMonitoringController
 * @Author wzb
 * @Date 2022/9/7 10:10
 * @Description
 */
@RestController
@RequestMapping("/coal/realtimeMonitoring")
public class RealtimeMonitoringController extends BaseController {


    @Autowired
    private IDeviceService deviceService;

    @PreAuthorize("@ss.hasPermi('coal:realtimeMonitoring:getTrendChart')")
    @GetMapping("/getTrendChart")
    public AjaxResult getTrendChart(@RequestParam(required = false) Long deviceId) {
        AjaxResult trendChart = deviceService.getTrendChart(deviceId);
        return trendChart;
    }


}
